import { createApp } from 'vue'
import { createPinia } from 'pinia'

// import './style.css'
import '@/styles/common.scss' // 可能不支持scss
import App from './App.vue'
import router from "@/router/index"
// 全局指令注册
import { directivePlugin } from '@/directives/index'
// 引入全局组件插件
import { componentPlugin } from '@/components'

const pinia = createPinia()
const app = createApp(App)

import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

//注册持久化插件
pinia.use(piniaPluginPersistedstate)
app.use(pinia)


app.use(router)
app.use(pinia)
app.use(directivePlugin)


app.use(componentPlugin)


app.mount('#app')
